-
Notifications
You must be signed in to change notification settings - Fork 0
Dual Storage Architecture #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dual-storage-baseline
Are you sure you want to change the base?
Conversation
* Dual writer: mode 3 * Add integration tests for playlits in mode 3 * Remove todo * Update pkg/apiserver/rest/dualwriter_mode3.go Co-authored-by: Arati R. <[email protected]> * Admin: Fixes an issue where user accounts could not be enabled (#88117) Fix: unable to enable user * [REVIEW] FInish mode 3 and add tests * Improve logging * Update dependencies * Update pkg/apiserver/rest/dualwriter_mode3_test.go Co-authored-by: maicon <[email protected]> * remove test assertion * Use mode log when dual writer is initiated --------- Co-authored-by: Arati R. <[email protected]> Co-authored-by: gonvee <[email protected]> Co-authored-by: maicon <[email protected]>
|
@claude review this PR |
1 similar comment
|
@claude review this PR |
|
Claude finished @akshayutture-augment's task —— View job PR Review: Dual Storage Architecture - Mode 3 ImplementationI've completed my review of this PR. This implements Mode 3 of the dual writer pattern, which writes to both LegacyStorage and Storage (new unified store) but reads exclusively from Storage. Here are my findings: 🔍 Critical Issues1. Inconsistent Metrics Recording in DeleteCollection (pkg/apiserver/rest/dualwriter_mode3.go:166)_, err := d.Legacy.DeleteCollection(ctx, deleteValidation, options, listOptions)
d.recordStorageDuration(err != nil, mode3Str, options.Kind, method, startLegacy) // ❌ Should be recordLegacyDurationIssue: Line 166 calls Fix: Change to 2. Wrong Metric Label in Delete Method (pkg/apiserver/rest/dualwriter_mode3.go:106)d.recordStorageDuration(false, mode3Str, name, method, startStorage) // ❌ Using 'name' instead of 'options.Kind'Issue: Line 106 passes Fix: Change to 3. Context Propagation Issue (Multiple locations)In Create, Delete, Update, and DeleteCollection methods, the context is used in goroutines after being modified with a timeout: go func() {
ctx, cancel := context.WithTimeoutCause(ctx, time.Second*10, errors.New("legacy create timeout"))
defer cancel()
// ... uses ctx
}()Issue: The context Fix: Use a new context derived from go func() {
bgCtx := context.WithoutCancel(ctx) // or context.Background()
timeoutCtx, cancel := context.WithTimeoutCause(bgCtx, time.Second*10, errors.New("legacy create timeout"))
defer cancel()
// ... use timeoutCtx
}()
|
Test 6
Replicated from ai-code-review-evaluation/grafana-greptile#6